# coding:utf-8
# author    : ['王稣胤 820390693@qq.com', ]
# data      : 2020/6/8 15:22
# software  : PyCharm
# python    : '3.5.3 64bit'
# file      : env.py
"""
说明文档：

"""

import os


def get_env(name, type_ = str, default = None):
    val = os.getenv(name, default)
    if val is None:
        raise KeyError('不存在的环境变量名称')
    return type_(val)
